/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bryanprogramming.zend.logic.powerups;

import com.bryanprogramming.zend.logic.ZEnd;

/**
 *
 * @author charlesbryan
 */
public class SafeEndPowerUp extends PowerUp {

    private int undoAmount = 5;
    
    public SafeEndPowerUp(int cost, ZEnd game) {
        super(cost, "Safe End", game);
        this.description = "When you run out of moves and the game should be over, "
                + "this Power Up keeps the game alive and "
                + "adds up to" + undoAmount + " more undos to your current game.";

    }
    
    @Override
    public void usePowerUp() {
        this.game.setSafeEnd(true);
    }

    /**
     * @return the undoAmount
     */
    public int getUndoAmount() {
        return undoAmount;
    }
}
